# _*_ coding:utf-8 _*_
# at:2024-07-24
# author:zizle

import json
with open('ledger_bill.json', 'r', encoding='utf8') as f:
    lines = f.readlines()

with open('ledger_bill_aliyun.json', 'a+', encoding='utf8') as f2:
    for ln in lines:
        d = json.loads(ln)
        js = {
            '_id': {'$oid': d['_id']},
            'user_id': {'$oid': d['user_id']},
            'bill_time': d['bill_time'],
            'bill_name': d['bill_name'],
            'ledger_id': {'$oid': d['ledger_id']},
            'money': d['money'],
            'note': d['note']
        }
        f2.write(json.dumps(js, ensure_ascii=False) + '\n')
